﻿<Page x:Class="Resn.WhuPub.WPFClientUI.ManageDepartmentsPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      Style="{StaticResource PageStyle}" Loaded="Page_Loaded">

        <Grid Name="LayoutRoot">
                <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid>
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" 
                                   Text="部门管理"
                                    />
                        <TextBlock Grid.Column="1"
                                   Text="{Binding Branch.FullName}"
                                    />
                        <Button Content="新建" Grid.Column="2"
                                Style="{DynamicResource ButtonStyle}" Click="CreateButton_Click" />
                        <Button Content="编辑" Grid.Column="3" Name="UpdateButton"
                                Style="{DynamicResource ButtonStyle}" Click="UpdateButton_Click" />
                        <Button Content="删除" Grid.Column="4" Name="RemoveButton"
                                Style="{DynamicResource ButtonStyle}" Click="DeleteButton_Click" />
                        <Button Content="搜索" Grid.Column="5" Name="SearchButton"
                                Style="{DynamicResource ButtonStyle}" Click="SearchButton_Click" />
                        <Button Content="专业开设" Grid.Column="6" Name="MajorSetupButton"
                                Style="{DynamicResource ButtonStyle}" Click="MajorSetupButton_Click" />
                        <Button Content="联系人" Grid.Column="7"
                                Style="{DynamicResource ButtonStyle}" Click="ContactButton_Click" />
                </Grid>

                <Grid Grid.Row="1">
                        <ListBox Name="DepartmentsListBox"
                                 Style="{StaticResource ListBoxStyle}"
                                 ItemsSource="{Binding Departments}"
                                 ItemTemplate="{StaticResource DepartmentDataTemplate}"
                                 SelectedValue="{Binding Department}"/>
                </Grid>

                <Grid Grid.Row="2">
                        <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="1" Style="{StaticResource PageBackButtonStyle}" />
                                
                </Grid>
        </Grid>
</Page>